package com.beigai.imessage.message.dto;

/**
 * Created by xxl on 2017/5/10.
 */
public class MessageDTO implements Comparable<MessageDTO> {
    /*消息序列*/
    private Integer messageSortNum;
    /*消息*/
    private String message;

    public Integer getMessageSortNum() {
        return messageSortNum;
    }

    public void setMessageSortNum(Integer messageSortNum) {
        this.messageSortNum = messageSortNum;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public int compareTo(MessageDTO o) {
        if (this.messageSortNum > o.messageSortNum)
            return 1;
        else if (this.messageSortNum == o.messageSortNum)
            return 0;
        else return -1;
    }
}
